/**
 * ControladoraReciboMatricula.java
 */

 /**
 *  AdSec: Administrador de Secundarias
 *  Copyright (C) 2009 Daniela Ramírez Chaves (dannyrch@gmail.com)
 *  Copyright (C) 2009 Leonel Salazar Valverde (leo87sv@gmail.com)
 *
 *  This file is part of AdSec.
 *  AdSec is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  AdSec is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with AdSec.  If not, see <http://www.gnu.org/licenses/>.
 */

package adsec.negocios;

import java.util.LinkedList;
import adsec.datos.ControladoraBDReciboMatricula;
import adsec.entidades.ReciboMatricula;
import adsec.entidades.MatriculaGrid;


public class ControladoraReciboMatricula {

    private ControladoraBDReciboMatricula controladoraBDMatricula;
    private LinkedList<MatriculaGrid> listaMatriculas;

    public ControladoraReciboMatricula(){
        this.controladoraBDMatricula = new ControladoraBDReciboMatricula();
        this.listaMatriculas = new LinkedList<MatriculaGrid>();
    }//fin de constructor

    public ReciboMatricula consultarMatricula(int idMatricula){
        return this.controladoraBDMatricula.consultarMatricula(idMatricula);
    }

    public ReciboMatricula consultarMatriculaGrid(int fila){
        return this.controladoraBDMatricula.consultarMatricula(this.listaMatriculas.get(fila).getIdRegistro());
    }

    public LinkedList<MatriculaGrid> consultarMatriculasGridTodas(){
        this.listaMatriculas = this.controladoraBDMatricula.consultarMatriculasGridTodas();
        return this.listaMatriculas;
    }

    public LinkedList<MatriculaGrid> consultarMatriculasGrid(int anio){
        this.listaMatriculas = this.controladoraBDMatricula.consultarMatriculasGrid(anio);
        return this.listaMatriculas;
    }

    public int insertarMatricula(ReciboMatricula matricula){
        return this.controladoraBDMatricula.insertarMatricula(matricula);
    }

    public int modificarMatricula(ReciboMatricula matricula){
        return this.controladoraBDMatricula.modificarMatricula(matricula);
    }

    public int eliminarMatricula(int idMatricula){
        return this.controladoraBDMatricula.eliminarMatricula(idMatricula);
    }

}//fin de ControladoraReciboMatricula
